package com.atguigu.structure.flyweight;

public class WebSiteClient {
    public static void main(String[] args) {
        WebSiteFactory factory = new WebSiteFactory();

        factory.getWebSite("新闻").use(new User("老胡"));

        factory.getWebSite("新闻").use(new User("秃咪"));

        factory.getWebSite("博客").use(new User("阮一峰"));

        System.out.println("已创建"+factory.getSize()+"个网站");

    }
}
